<ui:composition template="/templates/default.xhtml" 
				xmlns="http://www.w3.org/1999/xhtml"
				xmlns:h="http://java.sun.com/jsf/html"
				xmlns:f="http://java.sun.com/jsf/core"
				xmlns:fn="http://java.sun.com/jsp/jstl/functions"
				xmlns:ui="http://java.sun.com/jsf/facelets"
				xmlns:o="http://openfaces.org/"
				xmlns:c="http://java.sun.com/jstl/core">

	<ui:param name="crud" value="#{locationCrud}" />

	<ui:define name="listing">
		<ui:include src="list.xhtml" />
	</ui:define>

	<ui:define name="display">
	
		<h:outputText value="#{navController.breadcrumbTrail}" />	
		<h1>#{msg.locationDetail}</h1>
		<h:form>
		
            <h:outputText styleClass="error" value="#{locationCrud.item.statusMessage}" />

        	<h:panelGrid columns="3">     
           		<h:outputText value="#{msg.locationId}:"/>
           		<h:outputText />
               	<h:outputText value="#{locationCrud.item.extId}" />
      			
      			<h:outputText value="#{locationHierarchyService.lowestLevel.name}:"/>
      			<h:outputText />
      			<h:outputText value="#{locationCrud.item.locationLevel.extId}"/>
               	
               	<h:outputText value="#{msg.locationName}:"/>
               	<h:outputText />
               	<h:outputText value="#{locationCrud.item.locationName}" />
               	
               	<h:outputText value="Location Head:"/>
               	<h:outputText />
               	<h:outputText value="#{locationCrud.item.locationHead.extId}" />
               	               	
               	<h:outputText value="#{msg.locationType}:"/>
               	<img class="clickable" onclick="O$('popupWindowForLocType').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
                <h:outputText value="#{locationCrud.item.locationType}" />
                
                <h:outputText value="#{msg.locationLatitude}:"/>
	            <h:outputText />
	            <h:outputText value="#{locationCrud.item.latitude}" />
	             
	            <h:outputText value="#{msg.locationLongitude}:"/>
	            <h:outputText />
	            <h:outputText value="#{locationCrud.item.longitude}" />
	                 
	            <h:outputText value="#{msg.locationAccuracy}:"/>
	            <h:outputText />
	            <h:outputText value="#{locationCrud.item.accuracy}" />
	                  
	            <h:outputText value="#{msg.locationAltitude}:"/>
	            <h:outputText />
	            <h:outputText value="#{locationCrud.item.altitude}" />
	           
              	<h:outputText value="#{msg.fieldWorkerId}:"/>
              	<h:outputText />
              	<h:outputText value="#{locationCrud.item.collectedBy}" converter="#{fieldWorkerExtIdConverter}" />            	
              	
              	<h:outputText value="#{msg.insertDate}:"/>
              	<h:outputText />
               	<h:outputText value="#{locationCrud.item.insertDate}" converter="#{calendarConverter}" />
		    	
		    	<h:outputText value="#{msg.insertBy}:"/>
		    	<h:outputText />
				<h:outputText value="#{locationCrud.item.insertBy.fullName}" />	
				
				<h:outputText value="#{msg.dataStatus}:"/>
		    	<img class="clickable" onclick="O$('popupWindowForDataStatus').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
				<h:outputText value="#{locationCrud.item.status}" />	
			</h:panelGrid>
           	<br />

           	<h:commandButton action="#{locationCrud.editSetup}" value="#{msg.lblEdit}">
            	<f:setPropertyActionListener target="#{jsfService.itemId}" value="#{locationCrud.item.uuid}" />
           	</h:commandButton>
       </h:form>
	</ui:define>		
</ui:composition>
